Skip to content

feat: Interactive REPL + enhanced tools (edit, glob, grep)#100

Merged
jpleva91 merged 3 commits intomainfrom
feat/repl-tools
Apr 1, 2026
Merged

feat: Interactive REPL + enhanced tools (edit, glob, grep)#100
jpleva91 merged 3 commits intomainfrom
feat/repl-tools

Conversation

@jpleva91
Copy link
Copy Markdown
Contributor

@jpleva91 jpleva91 commented Apr 1, 2026

Summary

  • Interactive REPL: shellforge chat — pair-programming mode with persistent conversation history across prompts, color output, Ctrl+C handling, ! shell escape
  • edit_file tool: Targeted find-and-replace with exact match enforcement
  • glob tool: Pattern-based file discovery with recursive ** support
  • grep tool: Regex content search with file:line output format

Closes the feature gap with Claude Code CLI for interactive local-model coding.

CLI

shellforge chat                     # Interactive REPL (Ollama default)
shellforge chat --provider anthropic # Use Claude API
shellforge chat --model qwen3:14b   # Specific model

Test plan

  • 24 tool tests passing (edit_file, glob, grep edge cases)
  • 13 REPL tests passing (command parsing, shell passthrough, lifecycle)
  • go build ./cmd/shellforge/ succeeds
  • Manual: shellforge chat interactive session

🤖 Generated with Claude Code

jpleva91 and others added 3 commits April 1, 2026 01:27
…gramming

Three new tools to close the gap with Claude Code CLI:
- edit_file: targeted find-and-replace with exact match, multi-match rejection, and permission preservation
- glob: file pattern matching with recursive ** support, skips .git/node_modules
- grep: regex content search with file:line output, file type filtering, and directory exclusions

Includes 24 unit tests covering edge cases (no match, multiple matches, invalid regex, permissions, etc).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Terminal-based interactive mode with persistent conversation history across
prompts, making ShellForge usable as a pair-programming tool. Key features:
- Conversation history maintained across prompts (the core innovation)
- Shell command passthrough with ! prefix
- Ctrl+C interrupts current run without killing the session
- ANSI color output for prompt, errors, and governance denials
- Session stats (turns, tool calls, denials, duration) after each run

Includes 13 unit tests covering command parsing, shell execution, EOF
handling, and REPL lifecycle.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wire up the REPL and enhanced tools (edit_file, glob, grep) into the CLI.
shellforge chat starts an interactive pair-programming session with
persistent conversation history across prompts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jpleva91 jpleva91 merged commit 9975394 into main Apr 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant